package com.jzrh.flashbee.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jzrh.flashbee.common.core.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author Jince
 * @since: 2023.11.22 下午 09:17
 * @description:
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class FlashbeeUrl extends BaseEntity {
    /**
     * 主键
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * url编码
     */
    private String urlCoding;
    /**
     * 原始网址
     */
    private String originUrl;
    /**
     * 浏览次数
     */
    private Integer pageViews;
    /**
     * 到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expiration;
}
